home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mastering CorelDraw 8
/
Mastering CorelDraw 8.iso
/
a.exe
/
pro
/
Unit1.pas
< prev
Wrap
Pascal/Delphi Source File
|
1998-10-21
|
2KB
|
80 lines
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, FileCtrl, ComCtrls;
type
TForm1 = class(TForm)
Memo1: TMemo;
Timer1: TTimer;
Image1: TImage;
FileListBox1: TFileListBox;
Label1: TLabel;
ProgressBar1: TProgressBar;
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
var dir_str,file_des:array[0..255]of char;
temp,dir_s:string;
i:integer;
begin
//image1.picture.LoadFromFile('logo.ico');
getdir(0,dir_s);
getwindowsdirectory(dir_str,100);
temp:=dir_str;
if temp[length(temp)]<>'\' then
temp:=temp+'\';
{if not FileExists(temp+'desktop\50% Off Internet Store.url') then
begin
showmessage('It will create a Shortcut to our Internet Super Store!');
image1.picture.savetofile(temp+'cddepot.ico');
memo1.lines.add('IconFile='+temp+'cddepot.ico'); }
//showmessage(temp);
{
temp:=dir_str+'\'
else
temp:=dir_str; }
//memo1.lines.savetofile(temp+'desktop\50% Off Internet Store.url');
//end;
chdir(dir_s);
if dir_s[length(dir_s)]<>'\' then dir_s:=dir_s+'\';
{dir_s:=dir_s+'launcher.exe';
strpcopy(dir_str,dir_s);
winexec(dir_str,SW_shownormal); }
//temp:='c:\win\';
filelistbox1.directory:=dir_s;
for i:=0 to filelistbox1.items.count-1 do
begin
strpcopy(dir_str,filelistbox1.items[i]);
strpcopy(file_des,temp+dir_str);
copyfile(dir_str,file_des,false);
progressBar1.position:=trunc(100*((i+1)/filelistbox1.items.count));
end;
showmessage('Installation Done!');
timer1.Enabled:=true;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
close;
end;
end.